home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998…eptember: Technology Seed / September 98 ADC Seed CD.toast / LaserWriter 8.6b5 Seed / LaserWriter 8.6b5 / PrintingLib / PrintingLib.rsrc / PS_-8177 < prev    next >
Encoding:
Text File  |  1998-08-12  |  3.7 KB  |  250 lines

  1. %%BeginFile: lw8_level2_basicimage-2.1
  2. /$j 10 dict dup
  3. begin
  4. /ImageType 1 def
  5. /MultipleDataSource F def
  6. end
  7. def
  8. /im_save Z
  9. /setupimageproc Z
  10. /polarity Z
  11. /smoothflag Z
  12. /bpc Z
  13. /ih Z
  14. /iw Z
  15. /datatype Z
  16. /xtraData Z
  17. /$zdump Z
  18. /$z Z
  19. /binarydataproc
  20. {
  21. currentfile
  22. }bd
  23. /asciidataproc
  24. {
  25. currentfile 0(%ADOeod)/SubFileDecode filter/ASCIIHexDecode filter
  26. }bd
  27. /rledataproc
  28. {
  29. currentfile/RunLengthDecode filter
  30. }bd
  31. /rlea85dataproc
  32. {
  33. currentfile/ASCII85Decode filter/RunLengthDecode filter
  34. }bd
  35. level3 dup startnoload
  36. /miascii
  37. {
  38. [
  39. currentfile dup
  40. $zdump
  41. /readhexstring cvx
  42. /pop cvx dup
  43. $z
  44. /readhexstring cvx
  45. /pop cvx
  46. ]cvx bind
  47. }bd
  48. /mibinary
  49. {
  50. [
  51. currentfile dup
  52. $zdump
  53. /readstring cvx
  54. /pop cvx dup
  55. $z
  56. /readstring cvx
  57. /pop cvx
  58. ]cvx bind
  59. }bd
  60. /mirle
  61. {
  62. [
  63. currentfile/RunLengthDecode filter dup
  64. $zdump
  65. /readstring cvx
  66. /pop cvx dup
  67. $z
  68. /readstring cvx
  69. /pop cvx
  70. ]cvx bind
  71. }bd
  72. /mirlea85
  73. {
  74. [
  75. currentfile/ASCII85Decode filter/RunLengthDecode filter dup
  76. $zdump
  77. /readstring cvx
  78. /pop cvx dup
  79. $z
  80. /readstring cvx
  81. /pop cvx
  82. ]cvx bind
  83. }bd
  84. dup endnoload not dup startnoload
  85. /mibinary/binarydataproc ld
  86. /miascii/asciidataproc ld
  87. /mirle/rledataproc ld
  88. /mirlea85/rlea85dataproc ld
  89. endnoload
  90. /:imsv{/im_save save store}bd
  91. /:f
  92. {
  93. /xtraData xs
  94. /datatype xs
  95. /setupimageproc{
  96. //binarydataproc
  97. //asciidataproc
  98. //rledataproc
  99. //rlea85dataproc
  100. {
  101. currentfile/ASCII85Decode filter
  102. }
  103. {
  104. currentfile/DCTDecode filter
  105. }
  106. {
  107. currentfile/ASCII85Decode filter/DCTDecode filter
  108. }
  109. {
  110. currentfile 4 dict dup begin/Columns iw def/Rows ih def/DamagedRowsBeforeError ih def/BlackIs1 T def end/CCITTFaxDecode filter
  111. }
  112. {
  113. currentfile/ASCII85Decode filter 4 dict dup begin/Columns iw def/Rows ih def/DamagedRowsBeforeError ih def/BlackIs1 T def end/CCITTFaxDecode filter
  114. }
  115. {
  116. currentfile 5 dict dup begin/K -1 def/Columns iw def/Rows ih def/DamagedRowsBeforeError ih def/BlackIs1 T def end/CCITTFaxDecode filter
  117. }
  118. {
  119. currentfile/ASCII85Decode filter 5 dict dup begin/K -1 def/Columns iw def/Rows ih def/DamagedRowsBeforeError ih def/BlackIs1 T def end/CCITTFaxDecode filter
  120. }
  121. {
  122. currentfile 5 dict dup begin/K 1 def/Columns iw def/Rows ih def/DamagedRowsBeforeError ih def/BlackIs1 T def end/CCITTFaxDecode filter
  123. }
  124. {
  125. currentfile/ASCII85Decode filter 5 dict dup begin/K 1 def/Columns iw def/Rows ih def/DamagedRowsBeforeError ih def/BlackIs1 T def end/CCITTFaxDecode filter
  126. }
  127. //mibinary
  128. //miascii
  129. //mirle
  130. //mirlea85
  131. }datatype get store
  132. {
  133. [1 0]
  134. }{
  135. [0 1]
  136. }ifelse
  137. /polarity xs
  138. /smoothflag xs
  139. concat
  140. xtraData
  141. {
  142. 0 0 1 1 rC
  143. }if
  144. /$z xs
  145. /bpc xs
  146. xtraData{4 add}if
  147. /ih xs
  148. /iw xs
  149. datatype 13 ge
  150. {
  151. /$z $z string store
  152. /$zdump iw 7 add 8 idiv string store
  153. }if
  154. $c setcolorspace
  155. }bd
  156. /:j{im_save restore}bd
  157. /mkimgmtx
  158. {
  159. xtraData
  160. {
  161. [Width 0 0 Height 4 sub 0 2]
  162. }{
  163. [Width 0 0 Height 0 0]
  164. }ifelse
  165. }bd
  166. /do1img
  167. {
  168. $j dup begin
  169. /Width iw def
  170. /Height ih def
  171. /Decode polarity def
  172. /ImageMatrix mkimgmtx def
  173. /DataSource setupimageproc def
  174. /BitsPerComponent 1 def
  175. /Interpolate smoothflag def
  176. end
  177. imagemask
  178. }bd
  179. /:g
  180. {
  181. 1 G
  182. 0
  183. 1 1 idtransform abs exch pop
  184. 1 1
  185. rF
  186. 0 G
  187. do1img
  188. }bd
  189. /:h
  190. {
  191. :Fx
  192. 0
  193. 1 1 idtransform abs exch pop
  194. 1 1
  195. rF
  196. :Fx
  197. do1img
  198. }bd
  199. /:i
  200. {
  201. :Fx
  202. do1img
  203. }bd
  204. level3
  205. dup startnoload
  206. /:hm/:h ld
  207. dup endnoload not dup startnoload
  208. /domskimage
  209. {
  210. 4 dict begin
  211. /ImageType 3 def
  212. /InterleaveType 2 def
  213. /MaskDict
  214. $j begin
  215. /Width iw def
  216. /Height ih def
  217. /ImageMatrix mkimgmtx def
  218. /BitsPerComponent 1 def
  219. /Decode[1 0]def
  220. /Interpolate smoothflag def
  221. currentdict
  222. end def
  223. MaskDict dup length 1 add dict copy
  224. begin
  225. /Decode exch def
  226. /BitsPerComponent bpc def
  227. /DataSource setupimageproc def
  228. /DataDict currentdict
  229. end
  230. def
  231. currentdict end
  232. image
  233. }bd
  234. /clraray Z
  235. /:hm
  236. {
  237. ]
  238. /clraray 2 array store
  239. clraray
  240. polarity 0 get
  241. 3 -1 roll put
  242. ]clraray
  243. polarity 1 get 3 -1 roll put
  244. [/Indexed $c 1{clraray exch get aload pop}bind]setcolorspace
  245. [1 0]
  246. domskimage
  247. }bd
  248. endnoload
  249. %%EndFile
  250.